package com.swgk.core.customview;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;


import com.swgk.core.R;


public class BoldTextView extends RelativeLayout {

    private Context context;
    private TextView titleView;

    private boolean isShowBottomNumber;

    public BoldTextView(Context context) {
        this(context, null);
    }

    public BoldTextView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public BoldTextView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context = context;
        init();
    }

    private void init() {
        View view = LayoutInflater.from(context).inflate(R.layout.view_bold_text, this);
        titleView = view.findViewById(R.id.title_view);
        titleView.getPaint().setFakeBoldText(true);
    }

    public void setText(String s) {
        titleView.setText(s);
    }

    public void setText(int s) {
        titleView.setText(context.getString(s));
    }
}